<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;
?>

<?php
include_once "function_vpn_ssl.php";

$in_array['Enabled'] = $_POST['enabled'];
$in_array['Srv_Type'] = $_POST['service_type'];
$in_array['Dev_Type'] = $_POST['dev_type'];
$in_array['Protocol'] = $_POST['protocol'];
$in_array['Port'] = $_POST['port'];
$in_array['Lan_Ip'] = $_POST['lan_addr'];
$in_array['Lan_Mask'] = $_POST['lan_mask'];
$in_array['Route_Ip'] = $_POST['client_route'];
$in_array['Route_Mask'] = $_POST['client_route_mask'];
$in_array['Wan_Ip'] = $_POST['wan_addr'];
$in_array['Dns1'] = $_POST['dns1'];
$in_array['Dns2'] = $_POST['dns2'];
$in_array['Wins'] = $_POST['wins'];


$ssl = new CVPN_SSL_Server();
$num = 0;
$ssl -> edit_item_by_num($num, $in_array); 
$ssl -> Apply();

//print_r ($in_array);

include_once "function_misc_log.php";
logger("Modify", $in_array, "SSL_VPN_Service");
echo("<meta http-equiv='refresh'content=0;URL='vpn_ssl_server_config.php'>");

?>
